def read_pets(filename):
    with open(filename,encoding='utf-8') as f:
        content = f.read()

    print(content)

try:
    read_pets("cat.txt")
    read_pets("dog")
except FileNotFoundError:
    pass